package modelLag;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class TestDeletePerson.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestDeletePerson
{
    /**
     * Default constructor for test class TestDeletePerson
     */
    public TestDeletePerson()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }
    
    @Test
    public void testDeletePerson(){
        String navn = "And";
        String tlf = "1234";
        String adresse ="Vejen";
        Person p = new Person(navn,adresse,"tt",123,tlf);
        PersonContainer.getInstance().addPerson(p);
        p = PersonContainer.getInstance().findPerson(tlf);
        PersonContainer.getInstance().deletePerson(tlf);
        Person testp = PersonContainer.getInstance().findPerson(tlf);
        assertEquals(p,testp);

    }       
}
